<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>视频搜索 | Any-Video</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body style="background-color: #f1f1f1">

<div th:insert="~{header :: nav}"></div>

<div class="container" style="margin-top: 80px">
    <div class="row" style="padding: 20px">
        <div class="row" style="margin-top: 1px;">
            <div class="form-group raw col-md-8 col-md-offset-2">
                <form th:action="@{/s}" method="get">
                    <div class="col-md-10 col-xs-9">
                        <input type="text" id="videoUrl" style="color: #0f0f0f" class="form-control" name="wd">
                    </div>
                    <button class="btn btn-danger col-md-2 col-xs-3" type="submit">搜索</button>
                </form>
            </div>
        </div>
    </div>

    <div class="row" th:if="${hasResult}" style="margin-bottom: 10px">
        <div class="alert alert-info" role="alert" style="margin: 0 10px">
            <span class="glyphicon glyphicon-search"></span>  搜索结果 （[[${size}]] 条结果）
        </div>
    </div>

    <div class="row videoBox">
        <div class="col-md-2 col-sm-4 col-xs-6 videoItem" th:each="video:${videos}">
            <a th:href="@{/view(u=${video.value})}" class="videoUrl">
                <img th:src="${video.image}" class="img-responsive img-thumbnail videoImage">
                <div style="height: 20px; overflow: hidden">
                    <p class="text-left videoTitle" th:text="${video.title}"></p>
                </div>
            </a>
        </div>
    </div>
</div>

</body>
</html>
